package com.atos.optical.service.impl;

import com.atos.optical.common.BaseServiceImpl;
import com.atos.optical.mapper.SysProductInfoVersionMapper;
import com.atos.optical.model.po.SysProductInfoVersion;
import com.atos.optical.model.query.SysProductInfoVersionQuery;
import com.atos.optical.service.SysProductInfoVersionService;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wanghra
 * @version 1.0
 * @description
 * @date 2025/8/15
 */
@Slf4j
@Service
public class SysProductInfoVersionServiceImpl extends BaseServiceImpl<SysProductInfoVersionMapper,
        SysProductInfoVersion> implements SysProductInfoVersionService {
    @Autowired
    private SysProductInfoVersionMapper mapper;

    @Override
    public SysProductInfoVersionQuery pageByQuery(SysProductInfoVersionQuery query) {
        query.setOrders(OrderItem.descs("VERSION"));
        mapper.pageByQuery(query);
        return query;
    }
}
